import {superUser,adminUser,saleUser} from '@/config/roles'

const CONFIG={};

/**
 *
 * @type {{XINJIANGTI: {URL: string, VERSION: string, TOKEN: string, ROLE: string, ISOK: function}}}
 */
const  PROJECTS= {

  ADMINDEV:{
    API:{
      BASE:'https://mtapi.kq47.com',
      URL:'https://mtapi.kq47.com/v1',
      TOKEN: '',
      APPNAME: 'op',

      TOKENNAME: 'token',
      OPTION:{
        NEEDTOKEN:true
      },
      DEBUG:false,
      isOK:function(res){
        return res.result=='ok';
      },
      FROM:'/static/login_dev.html',
    },
    ROLE:adminUser


  },
  ADMINTEST: {
    API: {
      BASE: 'http://mtcsadmin.kq47.com/',
      URL: 'http://mtcsapi.kq47.com/v1',
      TOKEN: '',
      APPNAME: 'op',
      TOKENNAME: 'token',
      OPTION: {
        NEEDTOKEN: true
      },
      DEBUG: false,
      isOK: function (res) {
        return res.result == 'ok';
      },
      FROM: '/static/login_dev.html',
    },
    ROLE: adminUser


  },

  ADMIN:{
    API:{
      BASE:'http://car.maotukeji.com',
      URL:'https://api.maotukeji.com/v1',
      APPNAME: 'op',
      TOKENNAME: 'token',
      //TOKEN:'6bdc69ed3b4310227f229d7a8200a0ac',
      OPTION:{
        NEEDTOKEN:true
      },
      DEBUG:false,
      isOK:function(res){
        return res.result=='ok';
      },
      FROM:'/static/login.html',
    },
    ROLE:adminUser


  },

  WQDEV:{
    API: {
      BASE:'https://mtapi.kq47.com',
      URL:'https://mtapi.kq47.com/v1',
      APPNAME: 'partner',
      TOKENNAME: 'wq_token',
      OPTION:{
        NEEDTOKEN:true
      },
      DEBUG: false,
      TOKEN: '5d96a699b176cc7ba077e5aabc6d0b98',
      isOK:function(res){
        return res.result=='ok';
      },
      FROM: 'http://mtkf.kq47.com/',
    },
    ROLE:saleUser


  },
  WQTEST: {
    API: {
      BASE: 'http://mtcsapi.kq47.com/',
      URL: 'http://mtcsapi.kq47.com/v1',
      APPNAME: 'partner',
      TOKENNAME: 'wq_token',
      TOKEN: 'ad2ef9ce6cd0db2b2616def056d3c33b',
      OPTION: {
        NEEDTOKEN: true
      },
      DEBUG: false,
      isOK: function (res) {
        return res.result == 'ok';
      },
      FROM: 'http://mtcs.kq47.com',
    },
    ROLE: saleUser


  },
  WQ:{
    API:{
      BASE:'http://car.maotukeji.com',
      URL:'http://api.maotukeji.com/v1',
      TOKENNAME: 'token',
      APPNAME: 'partner',
      OPTION:{
        NEEDTOKEN:true
      },
      DEBUG:false,
      isOK:function(res){
        return res.result=='ok';
      },
      FROM: 'http://car.maotukeji.com',
    },
    ROLE:saleUser


  },
};


// CONFIG.PROJECT =PROJECTS.ADMIN; //运营后台正式环境
CONFIG.PROJECT = PROJECTS.ADMINDEV; //运营后台开发环境
// CONFIG.PROJECT =PROJECTS.ADMINTEST; //运营后台测试环境

// CONFIG.PROJECT = PROJECTS.WQ;     //wq正式环境
// CONFIG.PROJECT = PROJECTS.WQDEV; //wq开发环境
// CONFIG.PROJECT = PROJECTS.WQTEST; //wq测试环境


export {CONFIG}
